CREATE TABLE [dbo].[TMDOCU_CL02]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_ASTO] [dbo].[TD_VC_010] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[CO_COND_PAGO] [dbo].[TD_VC_003] NOT NULL,
[FE_VENC] [dbo].[TD_DT_001] NOT NULL,
[FE_PRES] [dbo].[TD_DT_001] NULL,
[FE_EMIS] [dbo].[TD_DT_001] NOT NULL,
[FE_PROG_COBR] [dbo].[TD_DT_001] NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TMDOCU_CL__FA_TI__526429B0] DEFAULT ((1.000)),
[FA_CAMB_EXTR] [dbo].[TD_NU_015_006] NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[IM_BRUT_AFEC] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__IM_BR__53584DE9] DEFAULT ((0)),
[IM_BRUT_INAF] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__IM_BR__544C7222] DEFAULT ((0)),
[CO_IMP1] [dbo].[TD_VC_003] NULL,
[PC_IMP1] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__PC_IM__5540965B] DEFAULT ((0)),
[IM_IMP1] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__IM_IM__5634BA94] DEFAULT ((0)),
[IM_TOTA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__IM_TO__5728DECD] DEFAULT ((0)),
[IM_PAGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMDOCU_CL__IM_PA__581D0306] DEFAULT ((0)),
[TI_DOCU_ORIG] [dbo].[TD_VC_003] NULL,
[NU_DOCU_ORIG] [dbo].[TD_VC_020] NULL,
[FE_DOCU_ORIG] [dbo].[TD_DT_001] NULL,
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[CO_ESTA_DOCU] [dbo].[TD_VC_003] NULL,
[NU_CANJ] [dbo].[TD_VC_008] NULL,
[TI_VEND] [dbo].[TD_VC_003] NULL,
[CO_VEND] [dbo].[TD_VC_020] NULL,
[TI_CLIE] [dbo].[TD_VC_003] NULL,
[TI_FACT] [dbo].[TD_VC_003] NULL,
[CO_LIQU] [dbo].[TD_VC_020] NULL,
[FE_DESP] [dbo].[TD_DT_001] NULL,
[CO_MODE_DIST] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMDOCU_CL__CO_US__5911273F] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMDOCU_CL__FE_US__5A054B78] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMDOCU_CL__CO_US__5AF96FB1] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMDOCU_CL__FE_US__5BED93EA] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMDOCU_CL02] ADD CONSTRAINT [PK__TMDOCU_C__F95F03363E88198C] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMDOCU_CL02] ADD CONSTRAINT [FK__TMDOCU_CL__CO_EM__78D4B6B2] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
